<?php

namespace frontend\models;

use Yii;

/**
 * This is the model class for table "{{%web_ad}}".
 *
 * @property integer $id
 * @property string $href
 * @property integer $img_id
 * @property integer $status
 * @property integer $created_at
 * @property integer $sort
 */
class WebAd extends \common\components\activeRecord2015
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%web_ad}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['img_id', 'status', 'created_at', 'sort'], 'integer'],
            [['sort'], 'required'],
            [['href'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'href' => 'Href',
            'img_id' => 'Img ID',
            'status' => 'Status',
            'created_at' => 'Created At',
            'sort' => 'Sort',
        ];
    }
}
